//
//  AudioBookDetailCell.m
//  FunRead
//
//  Created by  King on 15/5/27.
//  Copyright (c) 2015年 华东伟. All rights reserved.
//

#import "AudioBookDetailCell.h"

@implementation AudioBookDetailCell
- (void)dealloc
{
    [_coverSmall release];
    [_title release];
    [_playtimes release];
    [_duration release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.contentView.backgroundColor = [UIColor colorWithWhite:0.8 alpha:0.8];
        
        self.coverSmall = [[UIImageView alloc] initWithFrame:CGRectMake(5, 5, self.contentView.frame.size.height - 10, self.contentView.frame.size.height - 10)];
        [self.contentView addSubview:_coverSmall];
        [_coverSmall release];
        
        self.title = [[UILabel alloc] initWithFrame:CGRectMake(self.contentView.frame.size.height - 10 + 10, 5, 500, (self.contentView.frame.size.height - 10) / 2)];
        _title.font = [UIFont boldSystemFontOfSize:16];
        _title.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_title];
        [_title release];
        
        self.playtimes = [[UILabel alloc] initWithFrame:CGRectMake(self.contentView.frame.size.height - 10 + 10, (self.contentView.frame.size.height - 10) / 2 + 5, 60, (self.contentView.frame.size.height - 10) / 2)];
        _playtimes.textColor = [UIColor whiteColor];
        _playtimes.font = [UIFont boldSystemFontOfSize:12];
        [self.contentView addSubview:_playtimes];
        [_playtimes release];
        
        self.duration = [[UILabel alloc] initWithFrame:CGRectMake(self.contentView.frame.size.height - 10 + 10 + 60, (self.contentView.frame.size.height - 10) / 2 + 5, 80, (self.contentView.frame.size.height - 10) / 2)];
        _duration.font = [UIFont boldSystemFontOfSize:12];
        _duration.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_duration];
        [_duration release];
    }
    return self;
}
@end
